package org.splink.asbeangen.templates.as3;

public class As3Member {
	private String name;
	private String parsedName;
	private String type;
	private int vartype;

	public As3Member(String name, String parsedName, String type, int vartype) {
		this.setName(name);
		this.setParsedName(parsedName);
		this.setType(type);
		this.setVartype(vartype);
	}
	
	@Override
	public String toString() {
		return "As3Member [name=" + name + ", parsedName=" + parsedName + ", type=" + type + ", vartype=" + vartype
				+ "]";
	}
	
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((name == null) ? 0 : name.hashCode());
		result = prime * result + ((parsedName == null) ? 0 : parsedName.hashCode());
		result = prime * result + ((type == null) ? 0 : type.hashCode());
		result = prime * result + vartype;
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		As3Member other = (As3Member) obj;
		if (name == null) {
			if (other.name != null)
				return false;
		} else if (!name.equals(other.name))
			return false;
		if (parsedName == null) {
			if (other.parsedName != null)
				return false;
		} else if (!parsedName.equals(other.parsedName))
			return false;
		if (type == null) {
			if (other.type != null)
				return false;
		} else if (!type.equals(other.type))
			return false;
		if (vartype != other.vartype)
			return false;
		return true;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getName() {
		return name;
	}

	public void setParsedName(String parsedName) {
		this.parsedName = parsedName;
	}

	public String getParsedName() {
		return parsedName;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getType() {
		return type;
	}

	public void setVartype(int vartype) {
		this.vartype = vartype;
	}

	public int getVartype() {
		return vartype;
	}

}
